#ifndef __SVGPATHPARSER__H__
#define __SVGPATHPARSER__H__

/* The different commands for a path.
   SVG_path_ERROR is an unrecognized command. */
enum {
  SVG_path_ERROR,
  SVG_path_MOVETO_ABSOLUTE,
  SVG_path_MOVETO_RELATIVE,
  SVG_path_CLOSEPATH,
  SVG_path_LINETO_ABSOLUTE,
  SVG_path_LINETO_RELATIVE,
  SVG_path_HORIZONTAL_LINETO_ABSOLUTE,
  SVG_path_HORIZONTAL_LINETO_RELATIVE,
  SVG_path_VERTICAL_LINETO_ABSOLUTE,
  SVG_path_VERTICAL_LINETO_RELATIVE,
  SVG_path_CURVETO_ABSOLUTE,
  SVG_path_CURVETO_RELATIVE,
  SVG_path_SMOOTH_CURVETO_ABSOLUTE,
  SVG_path_SMOOTH_CURVETO_RELATIVE,
  SVG_path_QUADRATIC_BEZIER_CURVETO_ABSOLUTE,
  SVG_path_QUADRATIC_BEZIER_CURVETO_RELATIVE,
  SVG_path_SMOOTH_QUADRATIC_BEZIER_CURVETO_ABSOLUTE,
  SVG_path_SMOOTH_QUADRATIC_BEZIER_CURVETO_RELATIVE,
  SVG_path_ELLIPTICAL_ARC_ABSOLUTE,
  SVG_path_ELLIPTICAL_ARC_RELATIVE,
};

/* Command struct. At the moment params are not checked by the parser. */
typedef struct {
  int type;       /* type of command (see enum above) */
  int nparams;    /* number of params */
  float *params;  /* array of params */
} SVG_path_command;

void SVG_path_begin_parsing(const char*);   /* begin parsing from a string */
SVG_path_command *SVG_path_next_command();  /* get next command from path */

#endif
